package com.zmm.myyimixian.ui.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.zmm.myyimixian.ui.factory.FragmentFactory;

/**
 * Created by Administrator on 2016/10/23 0023.
 */

public class DingDanAdapter extends FragmentPagerAdapter{

    public DingDanAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return FragmentFactory.DINGDAN_TITLES[position];
    }

    @Override
    public Fragment getItem(int position) {
        return FragmentFactory.cerateDingDanFragment(position);
    }

    @Override
    public int getCount() {
        return FragmentFactory.DINGDAN_TITLES.length;
    }
}
